package com.lafer.xiao.controller;

import com.lafer.xiao.service.ExcelService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletResponse;

@RestController
@RequestMapping("excel")
public class ExcelController {

    private final ExcelService service;

    public ExcelController(ExcelService service) {
        this.service = service;
    }

    @RequestMapping("/export")
    public String export(HttpServletResponse response) {
        service.export(response);
        return "导出成功";
    }
}
